package com.tm.d13_lambda;

import com.tm.d12_arrays.Student;

/**
 *2024/5/25 Lambda表达式的调用类
 */
public class CompareByData {
    public static int compareByAge(Student o1,Student o2){
       return o1.getAge() -o2.getAge();//升序排序
    }

    public int compareByAgeDesc(Student o1,Student o2){
        return o2.getAge() -o1.getAge();//降序排序
    }
}
